package ten;

import static util.Print.print;

/**
 * Created by ab on 2016/11/4.
 */
public class lesson5 {
    public Destination destination(String dest,float price){
        return new Destination() {
          private int cost;
            {
                cost=Math.round(price);
                if(cost>100)
                    print("Over budget");
            }
            private String label=dest;
            @Override
            public String readLine() {
                return label;
            }
        };
    }
    public static void main(String[] args){
        lesson5 l = new lesson5();
        Destination d= l.destination("Tasmania",101.395f);
        print(d.readLine());
    }
}
